<?php
/**
 * This file is part of webman.
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the MIT-LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author    walkor<walkor@workerman.net>
 * @copyright walkor<walkor@workerman.net>
 * @link      http://www.workerman.net/
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */

use Webman\Route;

//项目
Route::any('/item/create', 'app\controller\Item@create');
Route::any('/item/update', 'app\controller\Item@update');
Route::any('/item/delete', 'app\controller\Item@delete');
Route::any('/item/select', 'app\controller\Item@select');
Route::any('/item/select/{id}', 'app\controller\Item@selectChild'); //获取项目的目录及其子集文档
Route::post('/item/find_by_name', 'app\controller\Item@findByName');
Route::post('/item/select_catalog_and_post', 'app\controller\Item@selectCatalogAndPost');

//目录
Route::any('/catalog/create', 'app\controller\Catalog@create');
Route::any('/catalog/update', 'app\controller\Catalog@update');
Route::any('/catalog/delete', 'app\controller\Catalog@delete');
Route::any('/catalog/select', 'app\controller\Catalog@select');
Route::post('/catalog/find_by_name', 'app\controller\Catalog@findByName');

//文档
Route::any('/post/create', 'app\controller\Post@create');
Route::any('/post/update', 'app\controller\Post@update');
Route::any('/post/delete', 'app\controller\Post@delete');
Route::any('/post/select', 'app\controller\Post@select');
Route::post('/post/find', 'app\controller\Post@find');
Route::post('/post/get_knowledge_book_tree', 'app\controller\Post@getKnowledgeBookTree'); // 获取知识库内容树
Route::post('/post/create_knowledge_book_tree', 'app\controller\Post@createKnowledgeBookTree'); // 创建知识库内容树
Route::post('/post/update_knowledge_book_tree', 'app\controller\Post@updateKnowledgeBookTree'); // 编辑知识库内容树
Route::post('/post/delete_knowledge_book_tree', 'app\controller\Post@deleteKnowledgeBookTree'); // 删除知识库内容树

//知识本
Route::post('/item/get_book_type', 'app\controller\Item@getBookType'); //获取类型
Route::post('/item/find_book_type', 'app\controller\Item@findBookType'); //获取单个类型
Route::post('/item/create_book_item', 'app\controller\Item@createBookItem'); //创建知识本项目
Route::post('/item/delete_book_item', 'app\controller\Item@deleteBookItem'); //删除知识本项目
Route::post('/item/get_book_item', 'app\controller\Item@getBookItem'); //获取知识本项目
Route::post('/post/create_knowledge_book_page', 'app\controller\Post@createKnowledgeBookPage');  //创建知识本内容页
Route::post('/post/update_knowledge_book_page', 'app\controller\Post@updateKnowledgeBookPage');  //更新知识本内容页
Route::post('/post/knowledge_book_page_tree', 'app\controller\Post@knowledgeBookPageTree');  //知识本内容页树
Route::post('/post/delete_knowledge_book_page', 'app\controller\Post@deleteKnowledgeBookPage');  //删除知识本内容页
Route::post('/post/post_bath_create', 'app\controller\Post@postBathCreate');  //批量创建知识本内容页
Route::post('/post/post_sync_tree', 'app\controller\Post@postSyncTree');  // 同步树结构

// 权限
Route::post('/member/update', 'app\controller\Member@update');    // 编辑知识库权限
Route::post('/member/delete', 'app\controller\Member@delete');    // 删除权限
Route::post('/member/select', 'app\controller\Member@select'); // 获取知识库权限
Route::post('/member/create', 'app\controller\Member@create'); // 创建知识库权限

// 文件记录
Route::post('/post_record/create', 'app\controller\PostRecord@create'); // 创建文件记录
Route::post('/post_record/update', 'app\controller\PostRecord@update'); // 更新文件记录
Route::any('/post_record/select', 'app\controller\PostRecord@select'); // 查询文件记录
Route::any('/post_record/find', 'app\controller\PostRecord@find'); // 查询文件记录
Route::post('/post_record/delete', 'app\controller\PostRecord@delete'); // 删除文件记录

// 知识库
Route::post('/book/create', 'app\controller\BookType@create'); // 创建知识库
Route::post('/book/update', 'app\controller\BookType@update'); // 更新知识库
Route::post('/book/delete', 'app\controller\BookType@delete'); // 删除知识库

Route::disableDefaultRoute();